<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<!-- <script src="https://unpkg.com/vue@next"></script> -->
		<script src="js/v2.6.10/vue.js"></script>
	</head>
	<body>
	
	  <div id="app">	
	    <h2>四舍五入</h2>
	    <input type="text" v-model="context" />
	    <h2>{{ context | type }}</h2>
	  </div>
	
	  <script>
	    var i =  new Vue({
	    el: "#app",
	  	data: {
	  	    context: "",
	  	},
	  	filters: {
	  		type: function(value){
	  			if (value == '') return
	  			return parseFloat(value).toFixed(2) + "元";
	  		}
	  	}
	  })
	  </script>
	</body>
</html>
